{if($msg==1)}
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="/inc/Editer/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/inc/Editer/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/inc/Editer/lang/zh-cn/zh-cn.js"></script>
<div class="main" style="height:auto;">
<div class="info">
	<p class="tt"><a>首页</a>><a href="infolist.php">公告管理</a>><span>编辑公告</span></p>
	<form class="infoedit">
		<input type="hidden" value="{$info[Id]}" name="infoid" />
		<p class="p1"><span>标题</span><input type="text" name="t0" value="{$info[title]}" /></p>		
		<div class="p2"><span class="sx">内容</span><script id="editor" type="text/plain" style="width:800px;height:300px;"></script></div>	
		
		<button type="button" onclick="infoedit();">立即修改</button>
	</form>
	<script src="./js/jquery.js"></script>
	<script>
		var ue = UE.getEditor('editor');
		ue.addListener('ready',function(editor){
			ue.setHeight(330);
			ue.setContent('{$info[content]}');
		 });		
		function infoedit(){
				$.ajax({
					type:"post",
					dataType:"json",
					url:"/Moudel.php?m=n&a=infoedit",
					data:$(".infoedit").serialize(),
					success:function(d){
						if(d[0]==0){
							alert(d[1]);
						}
						else{
							alert(d[1]);
							window.location.href='infolist.php';
						}
					}
				});
			}
	</script>
	
</div>
</div>
{else}
<link href="./css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="/inc/Editer/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="/inc/Editer/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="utf-8" src="/inc/Editer/lang/zh-cn/zh-cn.js"></script>
<div class="main" style="height:auto;">
<div class="info">
	<p class="tt"><a>首页</a>><a href="infolist.php">公告管理</a>><span>添加公告</span></p>
	<form class="infoadd">
		<p class="p1"><span>标题</span><input type="text" name="t0" placeholder="" /></p>		
		<div class="p2"><span class="sx">内容</span><script id="editor" type="text/plain" style="width:800px;height:300px;"></script></div>	
		
		<button type="button" onclick="infoadd();">确认添加</button>
	</form>
	<script src="./js/jquery.js"></script>
	<script>
		var ue = UE.getEditor('editor');
		function infoadd(){
				$.ajax({
					type:"post",
					dataType:"json",
					url:"/Moudel.php?m=n&a=infoadd",
					data:$(".infoadd").serialize(),
					success:function(d){
						if(d[0]==0){
							alert(d[1]);
						}
						else{
							alert(d[1]);
							window.location.href='infolist.php';
						}
					}
				});
			}
	</script>
	
</div>
</div>
{/if}